package com.ivc.info.dto.base;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.cs.framework.common.annotation.NotNull;
import com.cs.framework.common.bo.BoBase;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 库存明细
 * 
 * @author hedongzhou
 * 
 */
@Entity
@Table(name = "stock_detail")
public class StockDetailDto extends BoBase {

	private static final long serialVersionUID = -5007044679300793345L;

	/**
	 * 明细编号
	 */
	@Id
	@GeneratedValue(generator = "stockDetailGenerator")
	@GenericGenerator(name = "stockDetailGenerator", strategy = "increment")
	@Column(name = "detail_no")
	private Long detailNo;

	/**
	 * 库存编号
	 */
	@Column(name = "stock_no")
	@NotNull("库存编号")
	private Long stockNo;

	/**
	 * 供应商编号
	 */
	@Column(name = "supplier_no")
	@NotNull("供应商编号")
	private String supplierNo;

	/**
	 * 数量
	 */
	@Column(name = "quantity")
	@NotNull("数量")
	private Integer quantity;

	/**
	 * 申请日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "apply_date")
	@NotNull("申请日期")
	private Date applyDate;

	/**
	 * 业务编号
	 */
	@Column(name = "business_no")
	@NotNull("业务编号")
	private Long businessNo;

	/**
	 * 业务类型
	 */
	@Column(name = "business_type")
	@NotNull("业务类型")
	private String businessType;

	public Long getDetailNo() {
		return detailNo;
	}

	public void setDetailNo(Long detailNo) {
		this.detailNo = detailNo;
	}

	public Long getStockNo() {
		return stockNo;
	}

	public void setStockNo(Long stockNo) {
		this.stockNo = stockNo;
	}

	public String getSupplierNo() {
		return supplierNo;
	}

	public void setSupplierNo(String supplierNo) {
		this.supplierNo = supplierNo;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public Date getApplyDate() {
		return applyDate;
	}

	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}

	public Long getBusinessNo() {
		return businessNo;
	}

	public void setBusinessNo(Long businessNo) {
		this.businessNo = businessNo;
	}

	public String getBusinessType() {
		return businessType;
	}

	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}

}
